def str_util(file_name):
    try:
        f1=open(file_name,"r",encoding="UTF-8")
        content=f1.read()
        print("文件的全部信息如下")
        print(f"{content}")
    except Exception as e:
        print("文件传输异常")
        print(f"文件类型为{e}")
    finally:
        f1.close()

def append_to_file(file_name,data):
    f1 = open(file_name, "a", encoding="UTF-8")
    f1.write(data)
    f1.close()

if __name__ == '__main__':
    str_util("dsadsads")